﻿CREATE TABLE [dbo].[BillOrderPrescription]
(
	[Id] INT NOT NULL PRIMARY KEY IDENTITY, 
    [CardNo] NVARCHAR(50) NOT NULL, 
    [PrescNo] NVARCHAR(50) NOT NULL, 
    [PrescMoney] NUMERIC(18, 2) NOT NULL, 
    [OrderDept] NVARCHAR(50) NOT NULL, 
    [OrderDate] NVARCHAR(50) NOT NULL, 
    [BillId] INT NOT NULL, 
    [Guid] NVARCHAR(50) NOT NULL DEFAULT '', 
    [WxUserId] BIGINT NULL, 
    [BkMemberId] BIGINT NULL
)


GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'卡号',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'BillOrderPrescription',
    @level2type = N'COLUMN',
    @level2name = 'CardNo'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'处方单号',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'BillOrderPrescription',
    @level2type = N'COLUMN',
    @level2name = N'PrescNo'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'处方单金额',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'BillOrderPrescription',
    @level2type = N'COLUMN',
    @level2name = N'PrescMoney'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'开单科室',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'BillOrderPrescription',
    @level2type = N'COLUMN',
    @level2name = N'OrderDept'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'开单时间',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'BillOrderPrescription',
    @level2type = N'COLUMN',
    @level2name = N'OrderDate'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'缴费订单Id',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'BillOrderPrescription',
    @level2type = N'COLUMN',
    @level2name = N'BillId'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'处方单GUID',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'BillOrderPrescription',
    @level2type = N'COLUMN',
    @level2name = N'Guid'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'微信用户Id',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'BillOrderPrescription',
    @level2type = N'COLUMN',
    @level2name = N'WxUserId'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'倍康用户Id',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'BillOrderPrescription',
    @level2type = N'COLUMN',
    @level2name = N'BkMemberId'